import { request } from '@/utils/request';

const Api = {
  List: '/recharge/record/list',
  add: '/recharge/record',
  info: '/recharge/record',
  batch: '/recharge/record/batch',
  base: '/bank/base/list',
  modify: '/bank/base',
  addition: '/bank/base',
  delete: '/bank/base',
};

// 列表
export function getList(params: any) {
  return request.get({
    url: Api.List,
    params,
  });
}

// 详情
export function getInfo(id: number | string) {
  return request.get({
    url: `${Api.info}/${id}`,
  });
}

//添加
export function edit(data: any) {
  return request.put({
    url: Api.add,
    data,
  });
}

// 批量操作
export function batch(data: any) {
  return request.put({
    url: Api.batch,
    data,
  });
}
// 基础数据
export function base(params: any) {
  return request.get({
    url: Api.base,
    params,
  });
}
//修改
export function modify(data: any) {
  return request.put({
    url: Api.modify,
    data,
  });
}
//银行管理添加
export function addition(data: any) {
  return request.post({
    url: Api.addition,
    data,
  });
}
//删除
export function del(id: number | string) {
  return request.delete({
    url: `${Api.delete}/${id}`,
  });
}
